package com.sir.tao.carhire.entity.table;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sir.tao.carhire.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

/**
 * @author dyy
 * @data 2021/12/24 22:22
 * @description:
 */
@EqualsAndHashCode(callSuper = true)
@TableName("contract")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ContractEntity extends BaseEntity {

    /**id*/
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 甲方
     */
    private String firstParty;

    /**
     * 乙方
     */
    private String partyB;

    /**
     * 合同内容
     */
    private String content;

    /**
     * 签订时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;

    /**
     * 生效日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date takeTime;

    /**
     * 结束日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 开始时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 合同状态（1.待生效 2.生效 3.作废 4.过期）
     */
    private Integer status;

    /**
     * 软删除
     */
    private Integer flat;

    /**
     * 是否审核
     */
    private Integer isExamine;

    /**
     * 汽车id
     */
    private String carId;

    /**
     * 用户id
     */
    private String userId;

    private Integer isReceive;

}
